load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_binary", "buck_java_library")
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("android_devxx")

source_listing()

buck_java_library(
    name = "build_config",
    srcs = [
        "BuildConfigFields.java",
        "BuildConfigs.java",
    ],
    visibility = [
        "PUBLIC",
    ],
    deps = [
        "prelude//toolchains/android/third-party:guava",
    ],
    exported_deps = [
    ],
)

buck_java_library(
    name = "executable",
    srcs = ["GenerateBuildConfigExecutableMain.java"],
    visibility = [
        "prelude//toolchains/android/src/com/facebook/buck/android/build_config:generate_build_config_binary",
    ],
    deps = [
        "prelude//toolchains/android/src/com/facebook/buck/util:throwing_print_writer",
        "prelude//toolchains/android/third-party:args4j",
        "prelude//toolchains/android/third-party:guava",
        ":build_config",
    ],
)

buck_java_binary(
    name = "generate_build_config_binary",
    main_class = "com.facebook.buck.android.build_config.GenerateBuildConfigExecutableMain",
    visibility = [
        "PUBLIC",
    ],
    deps = [
        ":build_config",
        ":executable",
    ],
)
